<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.selectWidth3 {
	width: 132px;
}
.selectcss {
	padding: 3px 1px;
	border:1px solid #a1c0dc;
	background-color:#FFF;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<div>
<table class="t_css" width="100%" border="0" cellpadding="0" id="cyorgInfo2" cellspacing="1">
	<tr>
		<td colspan="9" class="t_bar">&nbsp;参与单位2基本信息</td>
	</tr>
	<tr>
		<td align="right" width="120px"><span class="color_red"
			style="display: none">*</span>单位名称：</td>
		<td colspan="8">
		    <input type="hidden" name="organizations/organization[2]@sequence_no" value="3">
			<input type="text" label="参与单位2基本信息中的单位名称"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/cname" style="width: 748px;"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/cname"/>">
		    </td>
	</tr>
	<tr>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>法人代码：</td>
		<td>    
		    <input type="text" label="参与单位2基本信息中的法人代码"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/org_no" style="width: 120px;"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/org_no"/>">
		</td>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>营业执照注册号：</td>
		<td colspan='2'>
		    <input type="text" label="参与单位2基本信息中的营业执照注册号"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/org_licence" style="width: 120px;"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/org_licence"/>">
		</td>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>生产、办公面积：</td>
		<td colspan='2'>
		    <input type="text" label="参与单位2基本信息中的生产、办公面积"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/office_product" style="width: 120px; text-align:right;" onfocus="InitInput.setNumber(this,7,0,0)"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/office_product"/>">平方米
		</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red" style="display: none">*</span>通讯地址：</td>
		<td colspan="8"><input type="text" label="参与单位2基本信息中的通讯地址"
			class="input_css needchk2" maxlength="100"
			name="organizations/organization[2]/address" style="width: 748px;"
			value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/address"/>"></td>
	</tr>
	
	<tr>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>总收入：</td>
		<td>    
		    <input type="text" label="参与单位2基本信息中的总收入"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/fund_total" style="width: 120px; text-align:right;" onfocus="InitInput.setNumber(this,7,4,2)"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/fund_total"/>">万元
		</td>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>研发投入：</td>
		<td colspan='2'>
		    <input type="text" label="参与单位2基本信息中的研发投入"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/fund_yanfa" style="width: 102px; text-align:right;" onfocus="InitInput.setNumber(this,7,4,2)"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/fund_yanfa"/>">万元
		</td>
	</tr>
	<tr>
	    <td nowrap align="right"><span class="color_red" style="display: none">*</span>经营范围：<br>（限100字）</td>
	    <td colspan="8"><textarea id="brief" name="organizations/organization[2]/opt_scope"
				rows='4' cols='120' class="textarea needchk2 maxlength:100"
				label="参与单位2基本信息中的经营范围"><x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/opt_scope" /></textarea>
	    </td>
	</tr>
	<tr>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>开户银行：</td>
		<td>    
		    <input type="text" label="参与单位2基本信息中的开户银行"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/bank_orgname" style="width: 120px;"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/bank_orgname"/>">
		</td>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>银行账号：</td>
		<td colspan='2'>
		    <input type="text" label="参与单位2基本信息中的银行账号"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/bank_account" style="width: 120px;"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/bank_account"/>">
		</td>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>信用等级：</td>
		<td colspan='2'>
		    <input type="text" label="参与单位2基本信息中的信用等级"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/bank_credit" style="width: 120px;"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/bank_credit"/>">
		</td>
	</tr>
	<tr>
	    <td align="right" width="120px"><span class="color_red" style="display: none">*</span>单位基本情况介绍：<br>（重点说明企业参与项目的必要性与可行性、技术基础、研发能力及资金保障能力。1000字以内）</td>
	    <td colspan='7'>
	         <textarea rows="10" cols="150" name='organizations/organization[2]/brief' class="input_textarea needchk2 maxlength:1000"   label="参与单位2单位基本情况介绍"><x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/brief"/></textarea>
	         <input type='hidden' name='organizations/organization[2]/brief_hidden' id='organizations/organization[2]/brief_hidden' value=''>
	    </td>
	</tr>
	<tr>
		<td colspan="9" class="t_bar">&nbsp;参与单位2负责人情况</td>
	</tr>
	<tr>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>姓名：</td>
		<td>    
		    <input type="text" label="参与单位2负责人情况中的姓名"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/resp_cname" style="width: 120px;"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/resp_cname"/>">
		</td>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>出生年月：</td>
		<td colspan='2'>
		    <c:set var="resp_birthday2">
				<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/resp_birthday"/>
			</c:set> 
		    <cpt:date id="resp_birthday2"  className="date needchk2 beforeToday" 
		              label="参与单位2负责人情况中的出生年月"   size="21"
		              name="organizations/organization[2]/resp_birthday"
		              value="${resp_birthday2}" >  
		    </cpt:date> 
		</td>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>任现职时间：</td>
		<td colspan='2'>
			<c:set var="resp_servingtime2">
				<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/resp_servingtime"/>
			</c:set>
			<cpt:date id="resp_servingtime2" className="date needchk2" 
		              label="参与单位2负责人情况中的任现职时间" size="21"
		              name="organizations/organization[2]/resp_servingtime"
		              value="${resp_servingtime2}" >  
		    </cpt:date>
		</td>
	</tr>
	<tr>
	    <td nowrap align="right"><span class="color_red" style="display: none">*</span>证件类型：</td>
	    <td >
			<c:set var="id_type_value">
				<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/id_type2_value" />
			</c:set>	
			<input type="hidden"  name="organizations/organization[2]/id_type2_value"  class="needchk2" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/id_type2_value" />" label="参与单位2负责人情况中的证件类型">
			<input type="hidden"  name="organizations/organization[2]/id_type2_name" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/id_type2_name" />">	
			<cpt:select id="id_type2"  key="id_type" className="selectWidth3" onChange="initControlValue(this.id);changeCardType1();" value="${id_type_value}"></cpt:select>
			
		</td>
	    <td nowrap align="right"><span class="color_red" style="display: none">*</span>证件号码：</td>
		<td colspan='2'>    
		    <input type="text" label="参与单位2负责人情况中的证件号码"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/resp_card_code" style="width: 120px;"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/resp_card_code"/>">
		</td>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>最高学历：</td>
		<td colspan='2'>
			<c:set var="resp_educate_value">
				<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/resp_educate2_value" />
			</c:set>	
			<input type="hidden"  name="organizations/organization[2]/resp_educate2_value"  class="needchk2" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/resp_educate2_value"/>" label="参与单位2负责人情况中的最高学历">
			<input type="hidden"  name="organizations/organization[2]/resp_educate2_name" value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/resp_educate2_name"/>">	
			<cpt:select id="resp_educate2"  key="educate" className="selectWidth3" onChange="initControlValue(this.id);" value="${resp_educate_value}"></cpt:select>
			
		</td>
		
	</tr>
	<tr>
	    <td nowrap align="right"><span class="color_red" style="display: none">*</span>专业：</td>
		<td >
		    <input type="text" label="参与单位2负责人情况中的专业"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/resp_major" style="width: 120px;"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/resp_major"/>">
		</td>
	    <td nowrap align="right"><span class="color_red" style="display: none">*</span>电话：</td>
		<td colspan='2'>    
		    <input type="text" label="参与单位2负责人情况中的电话"
				class="input_css needchk2" maxlength="50"
				name="organizations/organization[2]/resp_tel" style="width: 120px;"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/resp_tel"/>">
		</td>
		<td nowrap align="right"><span class="color_red" style="display: none">*</span>手机：</td>
		<td colspan='2'>
			<input type="text" label="参与单位2负责人情况中的手机"
				class="input_css mobile needchk2" maxlength="11" 
				name="organizations/organization[2]/resp_mobile" style="width: 120px;"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/resp_mobile"/>">
		</td>
		
	</tr>
	<tr>
	<td nowrap align="right"><span class="color_red" style="display: none">*</span>Email：</td>
		<td >
		    <input type="text" label="参与单位2负责人情况中的Email"
				class="input_css needchk2 email" maxlength="50"
				name="organizations/organization[2]/resp_email" style="width: 120px;"
				value="<x:out select="$xmlData/data/organizations/organization[@sequence_no='3']/resp_email"/>">
		</td>
	</tr>
</table>

 <div class="t_bar" align="left"><span id="tbl_org2_tips" class="color_red" style="display: none">*</span>近三年曾获政府资助的情况（金额：万元）</div>
     <table class="table01" width="100%"  border="0" cellpadding="0" id="tblfundprojectsorg2" cellspacing="1">
			<thead>
			<tr>
				<th>选择</th>
				<th>序号</th>
				<th>项目名称</th>
				<th>资助部门</th>
				<th>资助金额(万元)</th>
				<th width='93px'>资助时间</th>
				<th width='93px'>验收时间</th>
				<th>项目验收情况</th>
				<th>资助形式</th>
				<th>借款偿还情况</th>
				<th>还款时间</th>
			</tr>
			</thead>
			<tbody>
			<tr style="display: none" >
				<td nowrap=true align="center">
					<input type="radio" name="selfundprojectsorg2">
				</td>
				<td align="center">
					<span name="research|fund_project_org2[0]@sequence_no">[index]</span>
				</td>
				<td>
					<input type="text" name="research|fund_project_org2[0]|ctitle" size='10' class="input_text required tabfalg2" maxlength="50" label="项目名称" value=""  maxlength="200"/>
				</td>
				<td>
					<input type="text" name="research|fund_project_org2[0]|award_dept" size='12' id="award_dept2_[0]" class="input_text required  tabfalg2" maxlength="50" label="资助部门" value=""/>
				</td>
				<td>
					<input type="text" style="text-align: right"size='12' name="research|fund_project_org2[0]|award_amt" id="award_amt2_[0]" class="input_text required  tabfalg2" label="资助金额" onfocus="InitInput.setNumber(this,7,4,2)" value=""/>
				</td>
				<td nowrap>
				    <input  id="award_date2_[0]" name="research|fund_project_org2[0]|award_date" value=""
				     class=" input_text date required  tabfalg2" style="width:60%"
				     label="资助时间" />
				</td>
				<td nowrap>
					<input  id="accept_date2_[0]" name="research|fund_project_org2[0]|accept_date"  value=""
				     class=" input_text date tabfalg2" style="width:60%"
				     label="验收时间" />
				</td>
				<td>
		            <select id="accept_flag2_[0]" name="accept_flag2_[0]" onChange="myinitControlValue(this.id)"><option value=""></option></select>
			        <input type="hidden" id="accept_flag2_[0]_value" name="research|fund_project_org2[0]|accept_flag2_value" class="required tabfalg2" label="项目验收情况" />
			        <input type="hidden" id="accept_flag2_[0]_name" name="research|fund_project_org2[0]|accept_flag2_name"  /> 
	        	</td>
	        	
	        	<td>
					<input type="text" name="research|fund_project_org2[0]|fund_form" size='6' class="input_text required tabfalg2" label="资助形式" value=""  maxlength="200"/>
				</td>
	        	
				<td>
		            <select id="repay_flag2_[0]" onChange="myinitControlValue(this.id)"><option value=""></option></select>
			        <input type="hidden" id="repay_flag2_[0]_value" name="research|fund_project_org2[0]|repay_flag2_value" class="required tabfalg2" label="借款偿还情况" />
			        <input type="hidden" id="repay_flag2_[0]_name" name="research|fund_project_org2[0]|repay_flag2_name"  />
	        	</td>
				<td nowrap>
				    <input  id="repay_date2_[0]" name="research|fund_project_org2[0]|repay_date"  value=""
				     class=" input_text date tabfalg2" style="width:65px" 
				     label="还款时间" />
				</td>
			</tr>
			<c:set value="0" var="index" scope="page" />
			<x:forEach select="$xmlData/data/research/fund_project_org2" var="fund_project_org2">
				<c:choose>
					<c:when test="${index<10}">
						<c:set value="0" var="flag" scope="page" />
					</c:when>
					<c:otherwise>
						<c:set value="" var="flag" scope="page" />
					</c:otherwise>
				</c:choose>
				<tr>
					<td nowrap=true  align="center" >
						<input type="radio" name="selfundprojectsorg2">
					</td>
					<td align="center">
						<span name="research/fund_project_org2[${flag}${index}]@sequence_no">
						    ${index+1}
						</span>
					</td>
					<td>
						<input type="text" name="research/fund_project_org2[${flag}${index}]/ctitle" size='10' value="<x:out select="$fund_project_org2/ctitle" />" class="input_text required tabfalg2" maxlength="50" label="项目名称"/>
					</td>
					<td>
						<input type="text" name="research/fund_project_org2[${flag}${index}]/award_dept" size='12' value="<x:out select="$fund_project_org2/award_dept" />" class="input_text required tabfalg2" maxlength="50" label="资助部门"/>
					</td>
					<td>
						<input type="text" style="text-align: right" size='12' name="research/fund_project_org2[${flag}${index}]/award_amt" value="<x:out select="$fund_project_org2/award_amt" />" class="input_text required tabfalg2" label="资助金额" onfocus="InitInput.setNumber(this,7,4,2)"/>
					</td>
					<td nowrap="nowrap">
					    <c:set var="award_date" scope="page"><x:out select="$fund_project_org2/award_date"/></c:set>
						<input  id="award_date2_[${flag}${index}]" value="${award_date}" label="资助时间" 
						name="research/fund_project_org2[${flag}${index}]/award_date" 
						class="input_text date required tabfalg2"  style="width:60%"  /> 
					</td>
					<td nowrap="nowrap">
					    <c:set var="accept_date" scope="page"><x:out select="$fund_project_org2/accept_date"/></c:set>
						<input  id="accept_date2_[${flag}${index}]" value="${accept_date}" label="验收时间" 
						name="research/fund_project_org2[${flag}${index}]/accept_date" 
						class="input_text date  tabfalg2"  style="width:60%" /> 
					</td>
					<td>
          			    <select id="accept_flag2_[${flag}${index}]" onChange="myinitControlValue(this.id)"><option value=""></option></select>
			            <input type="hidden"  id="accept_flag2_[${flag}${index}]_value" name="research/fund_project_org2[${flag}${index}]/accept_flag2_value" class="required tabfalg2" label="项目验收情况" value="<x:out select="$fund_project_org2/accept_flag2_value" />"/>
			            <input type="hidden"  id="accept_flag2_[${flag}${index}]_name" name="research/fund_project_org2[${flag}${index}]/accept_flag2_name"  value="<x:out select="$fund_project_org2/accept_flag2_name" />"/>
          			</td>
          			
          			<td>
						<input type="text" name="research/fund_project_org2[${flag}${index}]/fund_form" size='6' value="<x:out select="$fund_project_org2/fund_form" />" class="input_text required tabfalg2" label="资助形式"/>
					</td>
          			
					<td>
          			    <select id="repay_flag2_[${flag}${index}]" onChange="myinitControlValue(this.id)"><option value=""></option></select>
			            <input type="hidden"  id="repay_flag2_[${flag}${index}]_value" name="research/fund_project_org2[${flag}${index}]/repay_flag2_value" class="required tabfalg2" label="借款偿还情况" value="<x:out select="$fund_project_org2/repay_flag2_value" />"/>
			            <input type="hidden"  id="repay_flag2_[${flag}${index}]_name" name="research/fund_project_org2[${flag}${index}]/repay_flag2_name"  value="<x:out select="$fund_project_org2/repay_flag2_name" />"/>
          			</td>
					<td nowrap="nowrap">
					    <c:set var="repay_date" scope="page"><x:out select="$fund_project_org2/repay_date"/></c:set>
						<input  id="repay_date2_[${flag}${index}]" value="${repay_date}" label="还款时间" 
						name="research/fund_project_org2[${flag}${index}]/repay_date" 
						class="input_text date  tabfalg2"  style="width:65px" /> 
					</td>
				</tr>
				<c:set value="${index+1}" var="index" scope="page" />
			</x:forEach>
			<script type="text/javascript">
				showAllDateTag("tblfundprojectsorg2");
			</script>
			</tbody>
		</table>
		<div class="clear_h15" ></div>
		<div align="left" >
			<input class="button_02"  type="button" value="添加" onclick="if(checkTabLimit('tblfundprojectsorg2',10,'近三年曾获政府资助的情况最多只能填写10条')){addNewRow('tblfundprojectsorg2');showDateTag('tblfundprojectsorg2');initOrgSelectType('tblfundprojectsorg2','accept,repay');changeClassDyn2();}try{top.resizeFrame();}catch(e){};">
			<input class="button_02" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tblfundprojectsorg2','selfundprojectsorg2')">
			<input class="button_02" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tblfundprojectsorg2','selfundprojectsorg2')">
			<input class="button_02" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tblfundprojectsorg2','记录');changeClassDyn2();">
		</div>
	</div>	
<br>
<script type="text/javascript">
	$(function() {
		$("#orgInfo2 tr:even").addClass("li_1");
		$("#orgInfo2 tr:odd").addClass("li_2");
		changeClassDyn2();
		loadOrgSelectType('tblfundprojectsorg2','accept,repay');
	});
	
	$(".needchk2").each(function(){
		$(this).bind("change",changeClassDyn2);
	});
	
	function changeClassDyn2(){
		var len = $("#tblfundprojectsorg2").find("tr").length-2; //参与单位2科研项目的长度
		$(".needchk2").each(function(){
			$(this).parents("table").find(".color_red").css("display","none");
			$("#tbl_org2_tips").css("display","none");
			
		});
		$(".needchk2").each(function(){
			if($(this).val()!='' || len!=0){
				$(this).parents("table").find(".color_red").css("display","");
				$("#tbl_org2_tips").css("display","");
			}
		});
	}
	function changeCardType1(){
		var cardTypeObj = $("[name$='id_type2_value']");
		var cardCodeObj = $("[name='organizations/organization[2]/resp_card_code']");
		
		if(cardTypeObj.val()=="1"){
			cardCodeObj.addClass("idCard");
			cardCodeObj.attr("label","身份证");
		} else {
			cardCodeObj.removeClass("idCard");
			cardCodeObj.attr("label","证件号码");
		}
	}

</script>